package com.jielin.handling.entity.auditresult;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jielin.handling.bean.base.BaseSearch;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by wangjienice on 2019-04-03.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class  AuditResult extends BaseSearch {
    private String id;

    private String ids;//卷宗id字符串

    private String auditorId;

    private String caseCode;

    private String caseName;

    private String policeId;

    private String materialStatus;//材料审核状态

    private String policeName;
    private Date applyDate;

    private String caseStaus;//案件状态

    private String auditorPoliceId;

    private String auditorPoliceCode;

    private String auditorPoliceName;

    private String accessLibrary;//卷宗状态

    private String suspectId;

    private String materialId;

    private Date auditTime;

    private int isHandle;

    private int whetherToWithdraw;//是否撤回

    private String isPass;


    private Date createDate;

    private Date modifyDate;

    private String passCause;//不通过原因
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date startDate;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endDate;
    private String borrowNameCode;
    private String outNameCode;


    private String nameAndCode;//法制员编号和姓名拼接,类似于--------->王五(001)nameAndDate
    private String nameAndDate;//审核通过涉案人员/时间
    private String policenameAndCode;//主办民警名称和编号 ------->  张三（001）
    private String suspectnameAndDate;//    嫌疑人/嫌疑人登记时间  ----->(李四/002)
    private String caseType;//案件类型
    private String policeCode;//主办民警编号
    private String handleUnitCode;//单位编号
    private Date acceptTime;//受理时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date auditPassDate;
    private String drawerCode;
    private String organizationName;
    private String civilianPolice;
    private String name;//嫌疑人姓名
    private String idValue;//嫌疑人身份证号
    private String suspectNameAndId;//嫌疑人身份证号码和名字
    private String headPhoto;
    private String sex;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date failDate;
    private int  withdrawalsCount;//撤回次数
    private int relationVideo;





    @Override
    public void setQueryCondition(JSONObject queryCondition) {
        this.policeId=queryCondition.getString("policeId");
        this.caseCode = queryCondition.getString("caseCode");
        this.caseName = queryCondition.getString("caseName");
        this.startDate=queryCondition.getDate("startDate");
        this.endDate=queryCondition.getDate("endDate");
        this.policenameAndCode = queryCondition.getString("policenameAndCode");
        this.caseType=queryCondition.getString("caseType");
        this.auditorPoliceCode=queryCondition.getString("auditorPoliceCode");
        this.policeCode=queryCondition.getString("policeCode");
        this.handleUnitCode=queryCondition.getString("handleUnitCode");
        this.caseStaus=queryCondition.getString("caseStaus");
        this.accessLibrary=queryCondition.getString("accessLibrary");
        this.suspectId=queryCondition.getString("suspectId");
        this.auditorId=queryCondition.getString("auditorId");
        this.materialStatus=queryCondition.getString("materialStatus");
        this.whetherToWithdraw=queryCondition.getIntValue("whetherToWithdraw");
        this.ids=queryCondition.getString("ids");
        this.name=queryCondition.getString("name");
        this.organizationName=queryCondition.getString("organizationName");
    }

}
